package io;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class InputStreamReaderDemo {

    public static void main(String[] args) throws IOException {

        InputStream in = new FileInputStream("test.txt");
        InputStreamReader r = new InputStreamReader(in);

        char[] cs = new char[1024];
        r.read(cs , 0 ,2);


        System.out.println(new String(cs,0,2));

        r.close();
        in.close();
    }
}
